package com.edfu.core.coursemgt.persistence.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="course_courseoffering")
public class CourseCourseOfferingRelnEntity implements ICourseMgtEntity {
	private long id;
	private CourseOfferingEntity courseOffering;
	private CourseEntity course;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	
	@ManyToOne
	@JoinColumn(name = "courseoffering_id", nullable = false)
	public CourseOfferingEntity getCourseOffering() {
		return courseOffering;
	}
	public void setCourseOffering(CourseOfferingEntity courseOffering) {
		this.courseOffering = courseOffering;
	}
	
	@ManyToOne
	@JoinColumn(name = "course_id", nullable = false)
	public CourseEntity getCourse() {
		return course;
	}
	public void setCourse(CourseEntity course) {
		this.course = course;
	}
	
}
